// Paper.java
public abstract class Paper {
    private final String title;

    public Paper(String title) {
        if (title == null || title.length() < 3) {
            throw new IllegalArgumentException("Title must be at least 3 characters");
        }
        this.title = title;
    }

    public String getTitle() { return title; }

    @Override
    public String toString() {
        return title + "(" + this.getClass().getSimpleName() + ")";
    }
}

class Thesis extends Paper {
    public Thesis(String title) { super(title); }
}

class JournalPaper extends Paper {
    public JournalPaper(String title) { super(title); }
}

class ConferencePaper extends Paper {
    public ConferencePaper(String title) { super(title); }
}